/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase - T13
 * <p>Powered by webrx On 2021-12-27 09:07:59
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class T13 {
    public static void main(String[] args) {
        var t = new T12();
        //线程写操作
        new Thread(() -> {
            t.write(12);
        }, "write").start();

        //100个线程读操作
        for (int i = 0; i < 100; i++) {
            new Thread(() -> {
                t.get();
            }, "read:" + i).start();
        }
    }
}
